<template>
	<el-card>
		<el-form ref="queryForm" :inline="true">
			<el-form-item label="关键词:">
				<el-input v-model="queryParams.keywords" placeholder="关键词"></el-input>
			</el-form-item>

			<el-form-item label="发布年份:">
				<el-date-picker v-model="queryParams.year" type="year" />
			</el-form-item>

			<el-form-item>
				<el-button icon="Search" type="primary" @click="handleSearch">查询</el-button>
			</el-form-item>
			<el-form-item>
				<el-button icon="RefreshRight" @click="handleReset">重置</el-button>
			</el-form-item>
		</el-form>
	</el-card>

	<el-card>
		<el-form :inline="true" style="text-align: right">
			<el-form-item>
				<el-button type="primary" @click="handleSearch">新增</el-button>
			</el-form-item>
			<el-form-item>
				<el-button type="success" plain @click="handleSearch">发布</el-button>
			</el-form-item>
		</el-form>

		<el-table
			v-loading="loading"
			:data="list"
			class="mt20"
			stripe
			element-loading-background="rgba(0, 0, 0, 0.5)"
			element-loading-text="加载中..."
			header-row-class-name="table-header"
		>
			<el-table-column key="name" label="立项批文名称" align="center" prop="name" />

			<el-table-column key="sex" label="发布日期" align="center" prop="sex"> </el-table-column>

			<el-table-column key="sex" label="状态" align="center" prop="sex"> </el-table-column>

			<el-table-column label="操作" fixed="right" header-align="center" align="center" width="200">
				<template #default="scope">
					<el-icon :size="16" color="#1491FF" title="查看" style="cursor: pointer; margin: 0 10px">
						<View />
					</el-icon>
				</template>
			</el-table-column>
		</el-table>
	</el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { min } from 'xe-utils'

const queryParams = ref({ keywords: '', year: '' })
const queryForm = ref()
const datatimelist = ref([])
const loading = ref(false)
const list = ref([
	{ name: 'aaa', sex: 1 },
	{ name: 'ccc', sex: 1 }
])
const zylist = [
	{ name: '1', value: 0 },
	{ name: '2', value: 1 },
	{ name: '3', value: 2 }
]
const bianzhilist = [
	{ name: '送审', value: 0 },
	{ name: '报批', value: 1 },
	{ name: '发布', value: 2 }
]
const jdstatuslist = [
	{ name: '正常', value: 0 },
	{ name: '滞销', value: 1 },
	{ name: '撤销', value: 2 },
	{ name: '归档', value: 3 }
]

const jobstatusoptions = [
	{ name: '全部', value: 0 },
	{ name: '在职', value: 1 },
	{ name: '离职', value: 2 }
]

const handleSearch = () => {
	console.log('搜索参数:', queryParams.value)
	// const { dateRange, ...searchParams } = searchFormState.value
	// const [startTime, endTime] = Array.isArray(dateRange) ? dateRange : [null, null]

	// // 搜索参数赋值
	// Object.assign(searchState, { ...searchParams, startTime, endTime })
	// searchData()
}

const handleReset = () => {
	//addCacheLog('🔄 重置搜索')
	// // 重置搜索表单状态
	// searchFormState.value = { ...defaultFilter.value }
	// resetSearch()
}
</script>

<style lang="scss" scoped></style>
